unit TVDGOEDEditFrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, AppUtils, BaseForm, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, dxSkinsCore, dxSkinOffice2010Blue, dxSkinscxPCPainter,
  cxPropertiesStore, dxLayoutLookAndFeels, dxLayoutContainer, dxLayoutControl,
  dxSkinDevExpressStyle, dxSkinVS2010, cxContainer, cxEdit,
  dxLayoutcxEditAdapters, dxLayoutControlAdapters, Vcl.Menus, Vcl.StdCtrls,
  cxButtons, cxTextEdit, cxClasses;

type
  TVDGOEDEditForm = class(TDezModalForm)
    grp1: TdxLayoutGroup;
    lc1: TdxLayoutControl;
    lf1: TdxLayoutLookAndFeelList;
    lcf1: TdxLayoutCxLookAndFeel;
    prop1: TcxPropertiesStore;
    txt_Name: TcxTextEdit;
    litm_lc1Item1: TdxLayoutItem;
    lGrplc1Group1: TdxLayoutGroup;
    btn_Ok: TcxButton;
    litm_lc1Item11: TdxLayoutItem;
    btn_Cancel: TcxButton;
    litm_lc1Item12: TdxLayoutItem;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure txt_NamePropertiesChange(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  VDGOEDEditForm: TVDGOEDEditForm;

implementation

uses cmDBUnit;

{$R *.dfm}


procedure TVDGOEDEditForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  //Action:= caFree;
end;

procedure TVDGOEDEditForm.FormCreate(Sender: TObject);
begin
  LoadForm(prop1,Self.Name);
end;

procedure TVDGOEDEditForm.txt_NamePropertiesChange(Sender: TObject);
begin
  btn_Ok.Enabled:= not VarIsType(txt_Name.EditingValue,[0,1]);
end;

initialization
 RegisterClass(TVDGOEDEditForm);
end.
